home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1988 March
/
Ahoy_Magazine_88-03_1988_Double_L.d64
/
Joyful Spirits
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
590b
|
23 lines
0 print"[147]"tab(12)"joyful spirits"
1 rem =================================
2 rem commodare problem #47-3 :
3 rem joyful spirits
4 rem solution by
5 rem casey riley
6 rem =================================
10 v=53248:x=100:y=150:for d=832 to 832+63 : poke d,255 : next
20 poke 2040,13 :poke v+21,1:poke v+39,1
30 poke v,x : poke v+1,y
40 c=peek(56320) :rem joystick in port 2
50 if (c and 1)=0 then y=y-1
60 if (c and 2)=0 then y=y+1
70 if (c and 4)=0 then x=x-1
80 if (c and 8)=0 then x=x+1
85 goto 30
89 rem optional boundaries (delete line 85)
90 if y<30 then y=30
100 if y>229 then y=229
110 if x<1 then x=1
120 if x>255 then x=255
130 goto 30